<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    
</body>
<script>

    var arr = [100,99,89,60,58,60,89,57];
    console.log(arr)
    var num = 0;
    for(var i=0;i<arr.length;i++){
        num += arr[i];
        // console.log(arr[0])
        // console.log(arr.length)
        var lvg;
      lvg =  num / arr.length;
    }
    // console.log(num)
    console.log(lvg)
</script>
</html>